home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / JAVA Utilities / JProxy 1.1.0 / customers / customer-edit.jsp < prev    next >
Encoding:
Text File  |  2003-04-29  |  5.5 KB  |  171 lines

  1. <%@ page language="java" import="
  2.     java.util.*,
  3.     com.jproxy.site.ejbeans.interfaces.*,
  4.     com.jproxy.site.*"
  5. %>
  6. <jsp:useBean id="customeredit" scope="request" class="com.jproxy.site.customers.CustomerEdit"/>
  7. <%
  8. customeredit.request(pageContext);
  9. if (!customeredit.ses.isLoggedIn())
  10. {
  11. %>
  12.   <jsp:forward page="login.jsp">
  13.   </jsp:forward>
  14. <%
  15. }
  16. customeredit.ses.setNewHit(pageContext, "hits", "Customer Account Edit", null);
  17. %>
  18.  
  19. <%
  20. // if any of submit buttons was hit forward away
  21. //if (customeredit.getParameter("submit") != null && !customeredit.getParameter("submit").equals(""))
  22. if(customeredit.forwardPage.length()>0)
  23. {
  24. %>
  25.   <jsp:forward page="<%=customeredit.forwardPage%>">
  26.   </jsp:forward>
  27. <%
  28. }
  29. %>
  30.  
  31. <!-- HEADER -->
  32. <jsp:include page="header.jsp" flush="true">
  33.   <jsp:param name="pageId" value="edit_customer"/>
  34. </jsp:include>
  35. <br>
  36. <table class="h8Verdana" cellpadding="5" width="100%" border="0">
  37. <!-- Prolog -->
  38.   <tr>
  39.     <td>
  40.      <p>
  41.       <%
  42.        if (customeredit.key.trim().equalsIgnoreCase("new"))
  43.        {
  44.       %>
  45.           Please enter new customer information. The customer name is required and
  46.           must not match any of already existing customers.
  47.           <p>
  48.           Once you will have created a customer you will be able to purchase
  49.           software licenses for that customer.
  50.           <p>
  51.       <%
  52.       } else
  53.           if (customeredit.key.trim().equalsIgnoreCase("edit"))
  54.           {
  55.         %>
  56.             This page allows you to update contact information of yours already existing customer. Please
  57.             note, that this page is only available for those customers who have no licenses purchased
  58.             toward them.
  59.         <%
  60.           }
  61.         %>
  62.       <form method=POST action=customer-edit.jsp>
  63.        <table class="h9Verdana" border="0" bgcolor="9c9cff" cellpadding="1" cellspacing="0">
  64.          <tr>
  65.            <td>
  66.             <%
  67.              if (customeredit.key.trim().equalsIgnoreCase("new"))
  68.              {
  69.             %>
  70.               Create a customer
  71.             <%
  72.              }
  73.               else
  74.               if (customeredit.key.trim().equalsIgnoreCase("edit"))
  75.               { %>
  76.                 Update a customer
  77.            <% }%>
  78.            </td>
  79.          </tr>
  80.          <tr>
  81.            <td>
  82.              <table class="h9Verdana" border="0" bgcolor="white" cellpadding="5" cellspacing="1">
  83.  
  84.               <tr class="h8Verdana">
  85.                <td></td>
  86.                <td>
  87.                 <font color="553399"><%=customeredit.msg%></font>
  88.                </td>
  89.               </tr>
  90.               <tr class="h8Verdana">
  91.                <td width="35%" align="right">
  92.                 <br>
  93.                 Customer Name*:
  94.                </td>
  95.                <td align="left">
  96.                 <br>
  97.                 <%
  98.                  if (customeredit.key.trim().equalsIgnoreCase("new"))
  99.                  {
  100.                 %>
  101.                   <input type="text" name="customer-name" size="50" maxlength="80" value="<%=customeredit.customer_name%>">
  102.                 <%
  103.                  }
  104.                   else
  105.                   if (customeredit.key.trim().equalsIgnoreCase("edit"))
  106.                   { %>
  107.                     <input type="text" name="customer-name" size="50" maxlength="80" readonly value="<%=customeredit.customer_name%>">
  108.                <% }%>
  109.  
  110.                </td>
  111.               </tr>
  112.  
  113.               <tr class="h8Verdana">
  114.                <td align="right">
  115.                 Email:
  116.                </td>
  117.                <td align="left">
  118.                 <input type="text" name="email" size="50" maxlength="80" value="<%=customeredit.email%>">
  119.                </td>
  120.               </tr>
  121.  
  122.               <tr class="h8Verdana">
  123.                <td align="right">
  124.                 Location:
  125.                </td>
  126.                <td align="left">
  127.                 <textarea wrap="virtual" name="address" cols="45" rows="5"><%=customeredit.address%></textarea>
  128.                </td>
  129.               </tr>
  130.  
  131.               <tr class="h8Verdana">
  132.                <td align="right">
  133.                 Telephone:
  134.                </td>
  135.                <td align="left">
  136.                 <input type="text" name="phone" size="50" maxlength="60" value="<%=customeredit.phone%>">
  137.                </td>
  138.               </tr>
  139.  
  140.               <tr class="h8Verdana">
  141.                <td align="right">
  142.                 Details:
  143.                </td>
  144.                <td align="left">
  145.                 <textarea wrap="virtual" name="details" cols="45" rows="5"><%=customeredit.details%></textarea>
  146.                </td>
  147.               </tr>
  148.  
  149.               <tr class="h8Verdana">
  150.                <td align="right">
  151.                </td>
  152.                <td align="right">
  153.                 <br>
  154.                  <INPUT name=submit style="HEIGHT: 24px; WIDTH: 100" type=submit value="<%=customeredit.buttonSubmit%>">
  155.                  <INPUT name=submit style="HEIGHT: 24px; WIDTH: 100" type=submit value="<%=customeredit.buttonCancel%>">
  156.                  <INPUT TYPE=HIDDEN NAME="forward" VALUE="<%=customeredit.forward%>">
  157.                  <INPUT TYPE=HIDDEN NAME="key" VALUE="<%=customeredit.key%>">
  158.                  <INPUT TYPE=HIDDEN NAME="customer-id" VALUE="<%=customeredit.customerID%>">
  159.                </td>
  160.               </tr>
  161.              </table>
  162.             </td>
  163.            </tr>
  164.         </table>
  165.       </form>
  166.      </td>
  167.    </tr>
  168.  </table>
  169. <!-- FOOTER -->
  170. <jsp:include page="footer.jsp" flush="true"/>
  171.